<template>
    <section class="content">
        <nav>
            <img src="../../../assets/images/e-logo.png" alt="">
            <div class="item">
                <ul>
                    <li class="li" @click="show=index"
                        :class="{active:show === index}"
                        v-for="(item,index) in items"
                        :key="index">{{ item.title }}
                    </li>
                </ul>
            </div>
            <div class="search">
                <input v-model="inputValue" type="text" placeholder="帖子关键词">
                <i class="el-icon-search"></i>
            </div>
        </nav>
    </section>
</template>

<script>
    export default {
        data() {
            return {
                items: [
                    {title: "首页"},
                    {title: "技术"},
                    {title: "专利"},
                    {title: "项目"},
                    {title: "企业"},
                    {title: "咨询"},
                    {title: "推荐"},
                    {title: "活动"}
                ],
                inputValue: '',
                show: 0
            }
        }
    }
</script>

<style scoped lang="scss">
    @import "../../../assets/styles/common";

    .content {
        width: 1200px;
        margin: 0 auto;
        nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 94px;
            .item {
                ul {
                    display: flex;

                    li {
                        font-size: 16px;
                        color: #222;
                        height: 28px;
                        width: 60px;
                        line-height: 28px;
                        text-align: center;
                        margin-right: 15px;
                        cursor: pointer;
                        /*background: #19b955;*/
                    }

                    /*li:nth-of-type(1) {*/
                    /*    color: #fff;*/
                    /*    background: #19b955;*/
                    /*}*/
                }
            }

            .search {
                position: relative;
                width: 320px;
                border: 2px solid #19b955;
                border-radius: 20px;
                line-height: 35px;

                input {
                    outline: none;
                    border: 0;
                    margin: 0 15px 0;
                    height: 35px;
                    width: 255px;
                    color: #999999;
                }

                i {
                    position: absolute;
                    font-size: 20px;
                    color: #19b955;
                    font-weight: 800;
                    top: 8px;
                    right: 18px;
                    cursor: pointer;
                }

            }

            .active {
                color: #fff !important;
                background: #19b955;
            }
        }

    }
</style>
